<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="box">
    {{ a | toDouble}}
    <input type="text" v-model="a">
</div>
</body>
<script>
    Vue.filter('toDouble', function (value) {
        return value<10?'0'+value:value;
    })
    var app = new Vue({
        el: '#box',
        data: {
            a: 0,
            arr: [1, 2, 3, 4, 5]
        },
        methods: {
            show: function () {
                alert(11);
            }
        },
    })
</script>
</html>